Check if datetime is set to default
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(DateTime), | intent(in) | :: | time |
FUNCTION DateTimeIsDefault & ! (time) & ! RESULT (isDefault) IMPLICIT NONE ! Arguments with intent(in): TYPE (DateTime), INTENT(IN) :: time ! Local declarations: LOGICAL :: isDefault !------------end of declaration------------------------------------------------ IF (time % year == 0 .AND. & time % month == 0 .AND. & time % day == 0 .AND. & time % hour == 0 .AND. & time % minute == 0 .AND. & time % second == 0 ) THEN isDefault = .TRUE. ELSE isDefault = .FALSE. END IF RETURN END FUNCTION DateTimeIsDefault